import type { RouteRecordRaw } from 'vue-router';
import { Layout } from '@/router/constant';
// import { renderSvg } from '@/utils/index';

/**
 * @param name 路由名称, 必须设置,且不能重名
 * @param meta 路由元信息（路由附带扩展信息）
 * @param redirect 重定向地址, 访问这个路由时,自定进行重定向
 * @param meta.disabled 禁用整个菜单
 * @param meta.title 菜单名称
 * @param meta.icon 菜单图标
 * @param meta.keepAlive 缓存该路由
 * @param meta.sort 排序越小越排前
 *
 */
const routes: Array<RouteRecordRaw> = [
  {
    path: '/reportForm',
    name: 'ReportForm',
    redirect: '/reportForm/dailyProductionQuota',
    component: Layout,
    meta: {
      title: 'reportForm',
      sort: 3,
      icon: 'reportForm',
    },
    children: [
      {
        path: 'dailyProductionQuota',
        name: 'DailyProductionQuota',
        meta: {
          title: 'dailyProductionQuota',
        },
        component: () => import('@/views/permission/reportForm/dailyProductionQuota/index.vue'),
      },
      {
        path: 'monthlySummary',
        name: 'MonthlySummary',
        meta: {
          title: 'monthlySummary',
        },
        component: () => import('@/views/permission/reportForm/monthlySummary/index.vue'),
      },
      {
        path: 'orderCostAnalyse',
        name: 'OrderCostAnalyse',
        meta: {
          title: 'orderCostAnalyse',
        },
        component: () => import('@/views/permission/reportForm/orderCostAnalyse/index.vue'),
      },
      {
        path: 'orderStatistics',
        name: 'OrderStatistics',
        meta: {
          title: 'orderStatistics',
        },
        component: () => import('@/views/permission/reportForm/orderStatistics/index.vue'),
      },
      {
        path: 'productionStatistics',
        name: 'ProductionStatistics',
        meta: {
          title: 'productionStatistics',
        },
        component: () => import('@/views/permission/reportForm/productionStatistics/index.vue'),
      },
      {
        path: 'shiftReportStatistics',
        name: 'ShiftReportStatistics',
        meta: {
          title: 'shiftReportStatistics',
        },
        component: () => import('@/views/permission/reportForm/shiftReportStatistics/index.vue'),
      },
      {
        path: 'staffReportStatistics',
        name: 'StaffReportStatistics',
        meta: {
          title: 'staffReportStatistics',
        },
        component: () => import('@/views/permission/reportForm/staffReportStatistics/index.vue'),
      },
      {
        path: 'machineOperationRecord',
        name: 'MachineOperationRecord',
        meta: {
          title: 'machineOperationRecord',
        },
        component: () => import('@/views/permission/reportForm/machineOperationRecord/index.vue'),
      },
      {
        path: 'machineProductionStatistics',
        name: 'MachineProductionStatistics',
        meta: {
          title: 'machineProductionStatistics',
        },
        component: () =>
          import('@/views/permission/reportForm/machineProductionStatistics/index.vue'),
      },
      {
        path: 'machineAlarmStatistics',
        name: 'MachineAlarmStatistics',
        meta: {
          title: 'machineAlarmStatistics',
        },
        component: () => import('@/views/permission/reportForm/machineAlarmStatistics/index.vue'),
      },
      {
        path: 'periodStatusMonitoring',
        name: 'PeriodStatusMonitoring',
        meta: {
          title: 'periodStatusMonitoring',
        },
        component: () => import('@/views/permission/reportForm/periodStatusMonitoring/index.vue'),
      },
    ],
  },
];

export default routes;
